import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl"

const TCHYURL = BASEURL.TCHYURL
const contractManagementApi = {
    //货主合同列表
    getCargoOwnerContractList(params){
        let url = TCHYURL + '/account/contract/cargo/list'
        return myaxios.get(url, params)
    },
    // 货主合同详情
    getCargoOwnerContractDetails(params){
        let url = TCHYURL + '/account/contract/cargo/detail'
        return myaxios.get(url, params)
    },
    delCargoContract(params){
        let url = TCHYURL + '/account/contract/cargo/delete'
        return myaxios.post(url, params)
    },
    editCargoContractInfo(params) {
        let url = TCHYURL + '/account/contract/cargo/edit'
        return myaxios.post(url, params)
    },
    //取得货主名称列表
    cargoNames(params){
        let url = TCHYURL + '/account/contract/cargo/names'
        return myaxios.get(url, params)
    },
     //供应商合同列表
     getSupplierContractList(params){
        let url = TCHYURL + '/account/contract/supplier/list'
        return myaxios.get(url, params)
    },
    //供应商合同详情
    getSupplierContractDetails(params){
        let url = TCHYURL + '/account/contract/supplier/detail'
        return myaxios.get(url, params)
    },
    deleteSupplierContract(params) {
        let url = TCHYURL + '/account/contract/supplier/delete'
        return myaxios.post(url, params)
    },
    //取得供应商名称列表
    supplierNames(params){
        let url = TCHYURL + '/account/contract/supplier/names'
        return myaxios.get(url, params)
    },
    //取得货主合同名称列表
    cargoContractNames(params){
        let url = TCHYURL + '/account/contract/cargo/contract/names'
        return myaxios.get(url, params)
    },
    //编辑/新增供应商合同
    editSupplierContractInfo(params) {
        let url = TCHYURL + '/account/contract/supplier/edit'
        return myaxios.post(url, params)
    },
}
export default contractManagementApi;